import request from '@/utils/request'

//获取app端申请的延时
/*
* 	"cmch": "",
	"djh": "",
	"pageNum": 0,
	"pageSize": 0,
	"sqtj": 0
	* */
export function getAppDelayApplicationList(data) {
  return request({
    url: `/yxdd/shipDelayedManage/appPageList`,
    method: 'post',
    data:data
  })
}

//获取app端申请 延时恢复 的列表
/*
* 	"cmch": "",
	"djh": "",
	"pageNum": 0,
	"pageSize": 0,
	"sqtj": 0 //申请途径 0 pc  1手机
	* */
export function getAppDelayRecoverApplicationList(data) {
  return request({
    url: `/yxdd/shipDelayedManage/appYshfPageList`,
    method: 'post',
    data:data
  })
}

// app 延时过闸申请 审核
// /shipDelayedManage/process
// data:
// "cbysglid": 0,
// 	"djid": 0,
// 	"shbz": "",
// 	"shzt": 0
export function appDelayAudit(data){
  return request({
    url:`/yxdd/shipDelayedManage/process`,
    method: 'post',
    data
  })
}



//获取船舶延时分页列表
export function getTableList(data) {
  return request({
    url: `/yxdd/shipDelayedManage/pageList`,
    method: 'post',
    data:data
  })
}

// 船舶延时登记
export function delayRegister(data) {
  return request({
    url: `/yxdd/shipDelayedManage/delayRegister`,
    method: 'post',
    data:data
  })
}
// 船舶延时恢复
export function delayRestore(data) {
  return request({
    url: `/yxdd/shipDelayedManage/delayRestore`,
    method: 'post',
    data:data
  })
}
// 获取船舶延时详情
export function getShipDelayedDetail(id) {
  return request({
    url: `/yxdd/shipDelayedManage/get/${id}`,
    method: 'post'
  })
}

// 根据船名船号登记号船闸搜索船舶信息
//2023-5-22 增加sfgz:'' 参数, 且传入空串, 否则 接口会在 登记号销号的时候, 报错,
//2023-5-25 改为 专门查登记详情的 会返回所有船舶信息 包含registerShipList
export function getRegisterCb(data) {
  return request({
    url: `/yxdd/register/getRegister`,
    method: 'post',
    data:data
  })
}


//根据船名船号登记号船闸所id和是否过闸来查询船舶
/**
 * {
	  "cmch": "test001", // 船名船号  // ?
	  "djh": "shc0001", // 登记号     // ?
	  "czsid": 36262, // 船闸所id //必传
	  "sfgz": 0 // 是否过闸，0-否，1-是 //必传 0
  }
 * */
//新增2023-5-25 专门查询未过闸的登记信息
export function getRegisterInfoWgz(data) {
  return request({
    url: `/yxdd/register/getRegister/wgz`,
    method: 'post',
    data:data
  })
}




// 船舶延时登记验证
export function delayRegisterValidate(data) {
  return request({
    url: `/yxdd/shipDelayedManage/delayRegisterValidate`,
    method: 'post',
    data:data
  })
}
